using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class UserServiceUtil
    {
	
		static internal IUserService CreateUserService()
        {
            IUserService target = IoCFactory.Resolve<IUserService>();
            return target;
        }
				#region User Test
 
        

		public static User CreateUser()
        {
            User result = GetUser();
            IUserService service = CreateUserService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static User CreateUserFull()
        {
            User result = GetUserFull();
            IUserService service = CreateUserService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static User GetUser()
        {
            User result = new User();
			
            result.Login = Guid.NewGuid().ToString();

            result.Password = Guid.NewGuid().ToString();
 
            return result;
            
        }
		
        public static User GetUserFull()
        {
            User result = GetUser();
            
            result.IsInactive = true;
 
            return result;
            
        }
		
		#endregion User Test
	

	}
}
